//
//  YZWorkNoteModel.h
//  VET
//
//  Created by 刘文靖 on 2018/7/10.
//  Copyright © 2018年 YZ. All rights reserved.
//

#import <Foundation/Foundation.h>
@class YZAutoItemModel,YZSwineryModel,YZPigModel;
@interface YZArchiveModel : NSObject
@property (nonatomic, assign) NSInteger archiveId; ///< 归档Id
@property (nonatomic, strong) NSString *archiveType; ///< 归档类型
@property (nonatomic, strong) NSString *number; ///< 猪只耳标号/猪群批次号
@property (nonatomic, strong) YZAutoItemModel *sex; ///<
@property (nonatomic, strong) YZAutoItemModel *status; ///<
@property (nonatomic, strong) YZAutoItemModel *type; ///<
@property (nonatomic, strong) YZAutoItemModel *species; ///<
@property (nonatomic, strong) NSString *optionStr; ///<
@property (nonatomic, strong) NSString *archiveStr;
@property (nonatomic, assign) NSInteger realQty; // 猪群存栏数
+ (YZArchiveModel *)convertWithPig:(YZPigModel *)pig;
+ (YZArchiveModel *)convertWithSwinery:(YZSwineryModel *)swinery;
@end

@interface YZAttachmentModel : NSObject
@property (nonatomic, strong) NSString *mediaType; ///< 附件类型（图片，音频，视频）
@property (nonatomic, strong) NSString *attachmentUrl; ///< 附件UrlStr
@property (nonatomic, assign) NSInteger mediaTime;       ///< 音频时长
@property (nonatomic, assign) NSString *mediaOrientation;       ///< 视频方向
@property (nonatomic, strong) NSURL *url; ///< 附件Url

@end

typedef NS_ENUM(NSInteger, YZWorkNoteAttachType) {
    YZWorkNoteAttachTypeImage,     //图片
    YZWorkNoteAttachTypeVideo,     //视频
    YZWorkNoteAttachTypeAudio,     //音频
};

@interface YZWorkNoteModel : NSObject
@property (nonatomic, assign) NSInteger noteId; ///< 笔记Id
@property (nonatomic, strong) NSString *noteText; ///< 正文
@property (nonatomic, strong) YZAutoItemModel *noteType; ///< 笔记分类
@property (nonatomic, strong) NSArray <YZAttachmentModel *>*attachmentList;///< 附件资源数组
@property (nonatomic, strong) NSArray <YZArchiveModel *>*archiveList;///< 归档数据数组
@property (nonatomic, assign) NSTimeInterval createTime;       ///< 笔记创建时间
@property (nonatomic, assign) BOOL isArchived;       ///< 是否归档
@property (nonatomic, assign) YZWorkNoteAttachType attachType; ///<附件类型（图片，音频，视频）

@end
